<?xml version="1.0" encoding="UTF-8" ?>
<!-- jsf:pagecode language="java" location="/src/pagecode/AddCustomer.java" --><!-- /jsf:pagecode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<h:head>
	<title>SSMS - Add New Customer</title>
	<meta http-equiv="Content-Type"
		content="application/xhtml+xml; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" title="Style"
		href="theme/stylesheet.css" />
	<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css"/>
	<link rel="stylesheet" type="text/css" href="js/ddsmoothmenu.css" />
	<link rel="stylesheet" type="text/css" href="js/ddsmoothmenu-v.css" />
	<script type="text/javascript" src="js/jquery-latest.js"></script>
	<script type='text/javascript' src="js/jquery.autocomplete.js"></script>
	<script type="text/javascript" src="js/ddsmoothmenu.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#subview1-form1-custid1").blur(function() {
				  if($(this).val().length == 0)
				  	$(this).toggleClass('red');
				  else
				  	$(this).toggleClass('normal');
				});
			$("#subview1-form1-custname1").blur(function() {
				  if($(this).val().length == 0)
				  	$(this).toggleClass('red');
				  else
				  	$(this).toggleClass('normal');
				});	
			$("#subview1-form1-custemail1").blur(function() {
				  if($(this).val().length == 0)
				  	$(this).toggleClass('red');
				  else
				  	$(this).toggleClass('normal');
				});
			$("#subview1-form1-custdesc1").blur(function() {
				  if($(this).val().length == 0)
				  	$(this).toggleClass('red');
				  else
				  	$(this).toggleClass('normal');
				});
			$("#subview1-form1-alottedspace1").blur(function() {
				  if($(this).val().length == 0)
				  	$(this).toggleClass('red');
				  else
				  	$(this).toggleClass('normal');
				  $('#subview1-form1-availablespace1').val($(this).val());
				});
			});
		ddsmoothmenu.init({
		mainmenuid: "smoothmenu1", //menu DIV id
		orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
		classname: 'ddsmoothmenu', //class added to menu's outer DIV
		//customtheme: ["#1c5a80", "#18374a"],
		contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
		})
	</script>
</h:head>
<h:body>
<div id="container">
	<h:panelGrid styleClass="panelGrid" id="grid1">
		<h:graphicImage styleClass="graphicImage" id="image1" name="ssms.jpg" library="images" width="760" height="51"></h:graphicImage>
	</h:panelGrid>
	<div id="smoothmenu1" class="ddsmoothmenu">
		<ul>
		<li><a href="index.html">Home</a></li>
		<li><a href="#">Services</a>
		  <ul>
		  <li><a href="import.html">Import Service</a></li>
		  <li><a href="export.html">Export Service</a></li>
		  <li><a href="report.html">Report Service</a></li>
		  </ul>
		</li>
		<li><a href="#">Manage</a>
		  <ul>
		  <li><a href="addCustomer.html">Add New Customer</a></li>
		  </ul>
		</li>
		<li><a href="contact.html">Contact Us</a></li>
		</ul>
	<br style="clear: left" />
	</div>
	<hr />
	<div id="wrapper">
	<div id="content">
	<f:subview id="subview1">
		<ui:insert name="pageContent">
		<h2>Add New Customer</h2>
						<h:form styleClass="form" id="form1">
							<table>
								<tbody>
									<tr>
										<td align="left">Customer ID:</td>
										<td style="width: 5px">&#160;</td>
										<td><h:inputText styleClass="inputText" id="custid1"
												value="#{pc_AddCustomer.customerMstr.custid}" requiredMessage="Customer ID is required." validatorMessage="Customer ID is invalid.">
												<f:validateRequired></f:validateRequired>
												<f:validateLength minimum="3"></f:validateLength>
											</h:inputText></td>
									</tr>
									<tr>
										<td align="left">Customer Name:</td>
										<td style="width: 5px">&#160;</td>
										<td><h:inputText styleClass="inputText" id="custname1"
												value="#{pc_AddCustomer.customerMstr.custname}" requiredMessage="Customer Name is required." validatorMessage="Customer Name is invalid.">
												<f:validateRequired></f:validateRequired>
											</h:inputText></td>
									</tr>
									<tr>
										<td align="left">Customer Email:</td>
										<td style="width: 5px">&#160;</td>
										<td><h:inputText styleClass="inputText" id="custemail1"
												value="#{pc_AddCustomer.customerMstr.custemail}" requiredMessage="Customer Email is required." validatorMessage="Customer Email is invalid.">
												<f:validateRequired></f:validateRequired>
											</h:inputText></td>
									</tr>
									<tr>
										<td align="left">Customer Description:</td>
										<td style="width: 5px">&#160;</td>
										<td><h:inputText styleClass="inputText" id="custdesc1"
												value="#{pc_AddCustomer.customerMstr.custdesc}" requiredMessage="Customer Description is required." validatorMessage="Customer Description is invalid.">
												<f:validateRequired></f:validateRequired>
											</h:inputText></td>
									</tr>
									<tr>
										<td align="left">Alotted Space:</td>
										<td style="width: 5px">&#160;</td>
										<td><h:inputText styleClass="inputText"
												id="alottedspace1"
												value="#{pc_AddCustomer.customerMstr.alottedspace}" requiredMessage="Alotted Space is required." validatorMessage="Alotted Space must be a integer.">
												<f:validateRequired></f:validateRequired>
											</h:inputText></td>
									</tr>
									<tr>
										<td align="left">Available Space:</td>
										<td style="width: 5px">&#160;</td>
										<td><h:inputText styleClass="inputText" id="availablespace1"
												value="#{pc_AddCustomer.customerMstr.availablespace}"
												readonly="false">
											</h:inputText>
										</td>
									</tr>
								</tbody>
							</table>
							<h:commandButton styleClass="commandButton" type="submit"
								value="Add" id="id1"
								action="#{pc_AddCustomer.createCustomerMstrAction}">
							</h:commandButton>
							<h:messages styleClass="messages" id="id2messages"></h:messages>
					</h:form>
		</ui:insert>
	</f:subview>
	</div>
	</div>
	<div id="footer">
		<h:outputText styleClass="outputText" id="text1" value="Created by SPHINX, 2011"></h:outputText>
	</div>
</div>
</h:body>
</html>